// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.modules.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.liuxinlong.modules.dao.MaterialDao;
import com.liuxinlong.modules.entity.Material;
import com.liuxinlong.modules.mapper.MaterialMapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

/**
 * 类描述
 * <p>
 * 此类关联设计的功能
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022年2月22日
 */
@Service
public class MaterialDaoImpl extends ServiceImpl<MaterialMapper, Material> implements MaterialDao {
	@Override
	public List<Material> pageMaterialList(Map<String, Object> queryParam) {
		return baseMapper.pageMaterialList(queryParam);
	}

	@Override
	public int getMaterialCount(Map<String, Object> queryParam) {
		return baseMapper.getMaterialCount(queryParam);
	}

	@Override
	public void addMaterial(Material material) {
		baseMapper.insert(material);
	}

	@Override
	public void updateMaterial(Material material) {
		baseMapper.updateById(material);
	}

	@Override
	public void deleteMaterial(String id) {
		baseMapper.deleteById(id);
	}

	@Override
	public Material getMaterialByNoRegion(String materialNo,String region) {
		return baseMapper.getMaterialByNoRegion(materialNo,region);
	}

	@Override
	public void batchUpdateMaterialStatus(List<String> targetNoList, String targetStatus) {
		baseMapper.batchUpdateMaterialStatus(targetNoList, targetStatus);
	}

	@Override
	public List<Material> getMaterialList() {
		return baseMapper.getMaterialList();
	}

}
